﻿
// MultiOpenDlg.h: 头文件
//

#pragma once
#include "CMutualClose.h"


// CMultiOpenDlg 对话框
class CMultiOpenDlg : public CDialogEx
{
// 构造
public:
	CMultiOpenDlg(CWnd* pParent = nullptr);	// 标准构造函数

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_MULTIOPEN_DIALOG };
#endif

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


private:
	CWnd *m_pWndOk;                        //确定按钮的窗口句柄
	CWnd *m_pWndCancle;                    //取消按钮的窗口句柄
	HHOOK m_hHook;                         //全局钩子的钩子句柄
	CMutualClose m_MutualClose;            //关闭互斥体的类对象

    NOTIFYICONDATA m_Notify;

protected:
	//遍历进程，将指定进程的斥体关闭
    void GetProcessInfoCloseMutual(DWORD dwFlag);

// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

public:
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedCancle();
	afx_msg LRESULT OnWeChatMessage(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnYoudaoMessage(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnShell_NotifyIcon(WPARAM wParam, LPARAM lParam);

private:
	CButton m_CBWeChat;
	CButton m_CBYoudaoNote;
private:
	CStatic m_PCWeChat;
	CStatic m_PCYouDao;
public:
	afx_msg void OnClose();
	afx_msg void OnDestroy();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
};
